package com.pubinfo.passbook.engine.factory;

import com.pubinfo.passbook.common.model.http.engine.ComputeChainParam;
import com.pubinfo.passbook.common.entity.TEngineComputeChain;
import com.pubinfo.passbook.engine.chain.ComputeChain;
import lombok.NonNull;

import java.util.Collection;

/**
 * 计算链工厂
 */
public interface ComputeChainFactory extends ComputorFactory<Collection<ComputeChainParam>, ComputeChain> {

    /**
     * 通过计算链表数据初始化计算链
     *
     * @param chainInfo
     * @return
     */
    ComputeChain<?, ?> getComputor(TEngineComputeChain chainInfo);


    /**
     * 根据计算链ID初始化计算链
     *
     * @param chainId
     * @return
     */
    ComputeChain<?, ?> getComputor(Integer chainId);
}
